import request from '@/utils/request'



///getReservationByUserIdAndVenueId/{userId}/{venueId}
export function getReservationByUserIdAndVenueId(venueId) {
  return request({
    url: '/reunion/reservation/getReservationByUserIdAndVenueId/' + venueId,
    method: 'get'
  })
}
///getReservationByVenueId/{venueId}
export function getReservationByVenueId(venueId) {
  return request({
    url: '/reunion/reservation/getReservationByVenueId/' + venueId,
    method: 'get'
  })
}
//addReservation
export function addUReservation(data) {
  return request({
    url: '/reunion/reservation/addReservation',
    method: 'post',
    data: data
  })
}


export function ulistReservation(query) {
  return request({
    url: '/reunion/reservation/ulist',
    method: 'get',
    params: query
  })
}
// 查询预约列表
export function listReservation(query) {
  return request({
    url: '/reunion/reservation/list',
    method: 'get',
    params: query
  })
}

// 查询预约详细
export function getReservation(id) {
  return request({
    url: '/reunion/reservation/' + id,
    method: 'get'
  })
}

// 新增预约
export function addReservation(data) {
  return request({
    url: '/reunion/reservation',
    method: 'post',
    data: data
  })
}
//uedit
export function ueditReservation(data) {
  return request({
    url: '/reunion/reservation/uedit',
    method: 'put',
    data: data
  })
}

//agreeReservation
export function agreeReservation(data) {
  return request({
    url: '/reunion/reservation/agreeReservation',
    method: 'put',
    data: data
  })
}
// 修改预约
export function updateReservation(data) {
  return request({
    url: '/reunion/reservation',
    method: 'put',
    data: data
  })
}

// 删除预约
export function delReservation(id) {
  return request({
    url: '/reunion/reservation/' + id,
    method: 'delete'
  })
}
